package com.timesheet.gui.efforttracker.actions;

import com.timesheet.gui.efforttracker.Activator;
import com.timesheet.gui.efforttracker.controllers.SectionEffortCompositeController;

import org.eclipse.jface.action.Action;

public class EditEffortAction extends Action {

	private SectionEffortCompositeController controller = null;

	public EditEffortAction(SectionEffortCompositeController controller) {
		setId("EditEffortAction");
		setText("Edit Effort");
		this.controller = controller;
		setImageDescriptor(Activator.getImageDescriptor("icons/editconfig.gif"));
	}

	@Override
	public void run() {
		controller.getNewEffortResultTableComposite().getEffortResultTableCompositeController()
				.getTaskTypeEditingSupport().setEditable(true);

		controller.getNewEffortResultTableComposite().getEffortResultTableCompositeController()
				.getTaskStatusEditingSupport().setEditable(true);
	}

}
